<!doctype html>
<html lang="en">

	<head>
		<meta charset="UTF-8">
		<title>后台管理-mytest</title>
		<meta name="renderer" content="webkit|ie-comp|ie-stand">
		<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
		<meta name="viewport" content="width=device-width,user-scalable=yes, minimum-scale=0.4, initial-scale=0.8,target-densitydpi=low-dpi" />
		<meta http-equiv="Cache-Control" content="no-siteapp" />

		<link rel="shortcut icon" href="/favicon.ico" type="image/x-icon" />
		<link rel="stylesheet" href="./css/font.css">
		<link rel="stylesheet" href="./css/xadmin.css">
		<script type="text/javascript" src="js/jquery.min.js"></script>
		<script src="./lib/layui/layui.js" charset="utf-8"></script>
		<script type="text/javascript" src="./js/xadmin.js"></script>
		<script type="text/javascript" src="./js/config.js"></script>

	</head>

	<body>
		<!-- 顶部开始 -->
		<div class="container">
			<div class="logo">
				<a>接口测试平台</a>
			</div>
			<div class="left_open">
				<i title="展开左侧栏" class="iconfont">&#xe699;</i>
			</div>
			<div class="left_open" style="margin-left: 30px;">
				<ul class="layui-nav" style="background: rgb(34, 34, 34)">
					<li class="layui-nav-item" style="margin-left: -20px;">
						<a href="javascript:;" id="projectname"></a>
						<dl class="layui-nav-child" id="projectlist"></dl>
					</li>
				</ul>
			</div>
			<ul class="layui-nav right" lay-filter="" style="margin-right: 10px;">
				<li class="layui-nav-item">
					<a href="javascript:;" style="padding-right: 30px;">
						<img src="images/men.jpg" class="layui-nav-img">
						<font id="username"></font>
					</a>
					<dl class="layui-nav-child">
						<dd><a onclick="modifypwd()">修改密码</a></dd>
						<dd><a onclick="logout()">退出</a></dd>
					</dl>
				</li>
			</ul>
			<ul class="layui-nav right" lay-filter="">
				<li class="layui-nav-item">
					
				</li>
			</ul>
		</div>
		<!-- 顶部结束 -->
		<!-- 中部开始 -->
		<!-- 左侧菜单开始 -->
		<div class="left-nav">
			<div id="side-nav">
				<ul id="nav">
					<li id='admin'>
						<a href="javascript:;">
							<i class="iconfont">&#xe723;</i>
							<cite><b>系统管理</b></cite>
							<i class="iconfont nav_right">&#xe697;</i>
						</a>
						<ul class="sub-menu">
							<li>
								<a _href="projectlist.html">
									<i class="iconfont">&#xe6a7;</i>
									<cite>项目管理</cite>
								</a>
							</li>
							<li>
								<a _href="userlist.html">
									<i class="iconfont">&#xe6a7;</i>
									<cite>所有用户</cite>
								</a>
							</li>
							<li>
								<a _href="channellist.html">
									<i class="iconfont">&#xe6a7;</i>
									<cite>渠道维护</cite>
								</a>
							</li>
						</ul>
					</li>
				</ul>
				<ul id="nav">
					<li>
						<a href="javascript:;">
							<i class="iconfont">&#xe723;</i>
							<cite><b>项目管理</b></cite>
							<i class="iconfont nav_right">&#xe697;</i>
						</a>
						<ul class="sub-menu">
							<li>
								<a id="users" _href="projectuserlist.html">
									<i class="iconfont">&#xe6a7;</i>
									<cite>项目用户</cite>
								</a>
							</li>
							<li>
								<a _href="preurllist.html">
									<i class="iconfont">&#xe6a7;</i>
									<cite>URL前缀</cite>
								</a>
							</li>
							<li>
								<a _href="sysparamlist.html">
									<i class="iconfont">&#xe6a7;</i>
									<cite>参数管理</cite>
								</a>
							</li>
							<li>
								<a _href="typelist.html">
									<i class="iconfont">&#xe6a7;</i>
									<cite>分类管理</cite>
								</a>
							</li>
							<li>
								<a _href="apilist.html">
									<i class="iconfont">&#xe6a7;</i>
									<cite>接口管理</cite>
								</a>
							</li>
						</ul>
					</li>
				</ul>
				<ul id="nav">
					<li>
						<a href="javascript:;">
							<i class="iconfont">&#xe723;</i>
							<cite><b>测试管理</b></cite>
							<i class="iconfont nav_right">&#xe697;</i>
						</a>
						<ul class="sub-menu">
							<li>
								<a _href="modellist.html">
									<i class="iconfont">&#xe6a7;</i>
									<cite>模型管理</cite>
								</a>
							</li>
							<li>
								<a _href="testcaselist.html">
									<i class="iconfont">&#xe6a7;</i>
									<cite>用例管理</cite>
								</a>
							</li>
							<li>
								<a _href="joblist.html">
									<i class="iconfont">&#xe6a7;</i>
									<cite>测试集</cite>
								</a>
							</li>
							<li>
								<a _href="timers.html">
									<i class="iconfont">&#xe6a7;</i>
									<cite>定时器</cite>
								</a>
							</li>
							<li>
								<a _href="excutelog.html">
									<i class="iconfont">&#xe6a7;</i>
									<cite>执行记录</cite>
								</a>
							</li>
							<li>
								<a id="tongji" _href="tongji.html">
									<i class="iconfont">&#xe6a7;</i>
									<cite>统计报表</cite>
								</a>
							</li>
						</ul>
					</li>
				</ul>
				<ul id="nav">
					<li>
						<a href="javascript:;">
							<i class="iconfont">&#xe723;</i>
							<cite><b>其他</b></cite>
							<i class="iconfont nav_right">&#xe697;</i>
						</a>
						<ul class="sub-menu">
							<li>
								<a _href="test.html">
									<i class="iconfont">&#xe6a7;</i>
									<cite>接口测试工具</cite>
								</a>
								<li>
									<a _href="canshu.html">
									<i class="iconfont">&#xe6a7;</i>
										<cite>系统参数</cite>
									</a>
								</li>
							</li>
						</ul>
					</li>
				</ul>
			</div>
		</div>
		<!-- <div class="x-slide_left"></div> -->
		<!-- 左侧菜单结束 -->
		<!-- 右侧主体开始 -->
		<div class="page-content">
			<div class="layui-tab tab" lay-filter="xbs_tab" lay-allowclose="false">
				<ul class="layui-tab-title">
					<li class="home"><i class="layui-icon">&#xe68e;</i>项目信息</li>
				</ul>
				<div class="layui-tab-content">
					<div class="layui-tab-item layui-show">
						<iframe src='./welcome.html' frameborder="0" scrolling="yes" class="x-iframe"></iframe>
					</div>
				</div>
			</div>
		</div>
		<div class="page-content-bg"></div>
		<!-- 右侧主体结束 -->
		<!-- 中部结束 -->
		<!-- 底部开始 -->
		<div class="footer">
			<div class="copyright">Copyright ©2019 chinapost All Rights Reserved</div>
		</div>
		<!-- 底部结束 -->
	</body>
	<script>
		$(document).ready(function() {
			$.ajax({
				url: base_url + '/project/list',
				type: 'get',
				data: {},
				dataType: 'json',
				success: function(result) {
					if(result.code == '0' && result.count>0) {
						for(var item in result.data) {
							var url = "index.html#/username="+username+"#/projectname="+encodeURI(result.data[item].projectname)+"#/projectid="+result.data[item].id;
							if(result.data[item].projectname != projectname) {
								$("#projectlist").append("<dd><a onclick=\"javascript:top.location.replace('"+url+"');location.reload()\">"+result.data[item].projectname+"</a>")
							}else{
								$("#projectlist").append("<dd class=\"layui-this\"><a onclick=\"javascript:top.location.replace('"+url+"');location.reload()\">"+result.data[item].projectname+"</a>")
							}
						}
					} else {
						layer.msg("没有参加任何项目");
						location.replace("login.html");
					}
					$("#projectname").html(projectname);
				}
			});
		});
		function logout() {
			$.ajax({
				url: base_url + '/user/logout',
				contentType: 'application/json; charset=utf-8',
				type: 'get',
				data: '',
				dataType: 'json',
				async: false,
				success: function(result) {
					if (result.code == '0') {
						top.location.href = 'login.html'
					}
				}
			});
			return false;
		}
	</script>
	<script>
		function modifypwd() {
			var ss = parent.layer.open({
				type: 2,
				title: '修改密码',
				area: ['1000px', '400px'],
				maxmin: true,
				content: ['modifypwd.html', 'yes']
			});
		}
	</script>

</html>
